package com.remainder.oss.s3.core;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * Oss配置类
 *
 * @author remainder
 * @date 2023/3/18 17:51
 **/
@Data
@ConfigurationProperties(prefix = "oss")
public class OssProperties {

    /**
     * 是否启用标记
     */
    private Boolean enable;

    /**
     * 对象存储服务的URL
     */
    private String endpoint = "oss-cn-shenzhen.aliyuncs.com";

    /**
     * 区域
     */
    private String region = "oss-cn-shenzhen";

    /**
     * true path-style nginx 反向代理和S3默认支持 pathStyle模式 {http://endpoint/bucketname} false supports virtual-hosted-style
     * 阿里云等需要配置为 virtual-hosted-style 模式{http://bucketname.endpoint} 只是url的显示不一样
     */
    private Boolean pathStyleAccess = true;

    /**
     * Access key
     */
    private String accessKey = "LTAI5tK8ep5g3TLTXPeJoTJH";

    /**
     * Secret key
     */
    private String secretKey = "p9m47Riya6ZgwAy1qm13OuxjKgnDZ8";

    /**
     * 最大线程数，默认： 100
     */
    private Integer maxConnections = 100;
}
